home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / qed480.zip / QED.DOC next >
Text File  |  1987-03-16  |  20KB  |  356 lines

  1.                  QED
  2.  
  3. This version of Quick Editor was derived from Nigel Gilbert's "E",
  4. as well as code from J. W. Haefner's "QED", and Mel Tearle's "GED".
  5. It is a stripped down, quick, WordStar-like editor. It is essentially a
  6. non-document insert mode editor without formatting commands. It does
  7. extend on WordStar in a few areas however:
  8.  
  9.    o  -Jn command line option (or ^J editing option) will jump to
  10.       line "n"
  11.    o  ^QKS switch controls auto-strip of trailing whitespace
  12.    o  ^QKA switch controls auto-indent for block structured code
  13.    o  ^QKT variable allows specifying TAB size
  14.    o  ^QKL switch can shut off status line
  15.    o  ^QKB switch can shut off backup file generation
  16.    o  ^_ key will undo deletions so long as you don't leave the line
  17.    o  -E command line option allows extended chars in text
  18.    o  -R command line option uses reverse video instead of bright
  19.    o  ^pg_up capitalizes & ^pg_dn converts to lower case (for a touch
  20.       typist who doesn't notice CAPSLOCK till 3 paragraphs later)
  21.  
  22. The following bugs have been fixed:
  23.  
  24.    o  tab portrayal corrected
  25.    o  Screen is redisplayed on exit from ^QK (context) functions
  26.    o  Help screen doesn't scroll off
  27.    o  Recall buffer fixed
  28.    o  Block menu hangup cured
  29.    o  All work files closed between consecutive edits
  30.  
  31. In addition, I've taken the liberty of making the following changes out
  32. of personal taste:
  33.  
  34.    o  Exit sequence verbosity reduced and reorganized to more
  35.       closely mirror those of WordStar
  36.    o  ^KD (save & edit another file) and ^KS (save & resume) added
  37.    o  Display attributes inverted to display text in low intensity
  38.    o  Normal attribute altered to suit CGA
  39.    o  Vertical movement through tabspace moves cursor left 1 tabstop
  40.    o  Word delete from begining of a word deletes up to next word
  41.    o  Miscellaneous keyboard reassignments (see IBM-PC column below)
  42.  
  43. Use CTL(^) to enable or disable the help display.
  44.  
  45. If you have a RAM drive on M: and a Hercules monochrome card, the following
  46. in a BAT file will use M: for the paging file (-dM option), use reverse
  47. video (-r) instead of bright, and enable the help screen (-v) by default:
  48.  
  49.         QED %1 -r -dM -v
  50.  
  51. I have been adding and adjusting the features of QED as suggestions are
  52. received. To suit those who felt the signon went by too fast to read, a
  53. more distinctive one was added. Since I can't stand signons myself, I
  54. also added a quiet switch (-q option) to bypass it.
  55.  
  56.                    COMMAND LINE SWITCH SUMMARY
  57.  
  58.  -A : auto indent                       -L : line & status display    
  59.  -B : auto backup                       -Q : quiet load - no signon   
  60.  -D : disk for work file                -R : reverse video highlight  
  61.  -E : extended character set            -S : strip trailing whitespace
  62.  -F : fast load minimal buffer          -Tn: tabwidth n columns       
  63.  -H : horizontal scroll whole page      -V : verbose help menu        
  64.  -Jn: jump to line n                    -X : overwrite command.com    
  65.  
  66.  
  67.  
  68.                         Howard Vigorita
  69.                         NYACC, 3/87
  70.  
  71.  
  72.                         DOCUMENTATION FOR QE AND QED
  73.                        (J. W. Haefner - 7 August 1985)
  74.  
  75. This is documentation for the programs QE and QED:  two modifications of 
  76. 'e' version 4.6b.  QE is the modification for BDS-C and QED is the 
  77. modification for DeSmet-C (hence the "D") under MSDOS version 2.x.  Since 
  78. the basic structure of these modifications is still that of e, that 
  79. documentation is relevant and I indicate here only the differences.
  80.  
  81.      'e' is a fine program, carefully written with good logical structure; 
  82. however, editors are a personal matter and many features that I thought 
  83. desirable were either missing, or awkwardly implemented.  Consequently, QE 
  84. and QED is the result of an attempt to incorporate different and additional 
  85. functions.  Most of these derive from WordStar, my favorite word 
  86. processor.  Since the modifications are basically superficial and (at one 
  87. level) "cosmetic", I have retained all references to Nigel Gilbert as the 
  88. author and copyright holder.  Each file indicates that it is a modification 
  89. of the original e (ver. 4.6).  On the other hand, my modifications conflict 
  90. to some degree with the philosophy detailed in the documentation to the 
  91. original 'e'.  Therefore, as indication of this possible conflict, I have 
  92. given new names to these modifications.  The "Q" was originally to mean 
  93. "quick", as my initial goal was to produce a smaller, faster version of 'e', 
  94. as I thought it terribly long and slow.  I did not achieve this goal and 
  95. instead came away with the perception that virtural memory editors must be 
  96. this large and slow.  Mr. Gilbert has done an admirable job.
  97.  
  98.      The documentation is in two parts.  Part 1 describes the features 
  99. common to both QE and QED.  Part two describes the features unique to QED.
  100.  
  101. I.   QE and QED
  102.      A.   WordStar functions
  103.      1.   SCROLLING:  ^W scrolls the screen down (i.e. UP through the text) 
  104. and leaves the cursor on the line and column prior to scroll.  ^Z scrolls 
  105. the screen up in the same manner.
  106.      2.   Delete to End of Line: ^QY deletes all text from the cursor to the 
  107. end of the line.
  108.      3.   Delete Line: ^\ now deletes the current line (this makes it 
  109. difficult to err, identical to my version of WordStar).  In 'e' v 4.6 and QE 
  110. and QED lines deleted can be recovered if the cursor has not left its 
  111. vertical sceen postion by typing ^N^_ (i.e. insert new empty line (^N), and 
  112. recover (^_)).  A more elaborate UNDO function is implemented in 'e' ver 
  113. 4.8, but I don't feel a need for it.
  114.      4.   Block manipulation: all of these are done through ^K as in 
  115. WordStar.  These functions are: quit (Q, as in 'e'), save and exit (X, as in 
  116. WordStar), file read (R), repeat a jump to the last jump line (J), and the 
  117. block moves of 'e' (B).
  118.      5.   Exit with Save: ^KX saves the file being edited and exits directly 
  119. to the operating system.
  120.      6.   BACKSPACE == LEFTKEY in all applications except find/replace 
  121. editing.
  122.      7.   QUICK functions;  analogous to WordStar, ^Q switches to other 
  123. functions (i.e. environment (K), delete to end of line (Y), find (F), alter 
  124. (A).
  125.      8.   Top and Bottom o Screen:  ^Y moves cursor to top of screen, ^V
  126. moves to bottom of screen.
  127.      9.   KEYS:  wherever possible, I have used WordStar mnemonics for
  128. control characters.  This is almost exact for the left hand; the right hand 
  129. uses my own choices (e.g. move to left end of line = ^O, to right end of 
  130. line = ^P, etc.   These are documented with a revised HELP display obtained 
  131. via ^^ (difficult to type but the interface is so obvious that I rarely, if 
  132. ever,  use HELP).  Below I give a map of the keys used in QE and QED.
  133.      10.  READ ALL ON INITIAL LOAD:  As a matter of preference, the initial 
  134. reading of a file from disk reads the entire file or as much as possible to 
  135. fill memory before displaying the first page.  Alteration of this feature 
  136. currently requires re-compilation, but it could easily be implemented as a 
  137. command line option. 
  138.  
  139.      B.   Fixes to "bugs"
  140.      1.   DIRECTORY:  'e' ver. 4.6 incorrectly calculated file sizes for my 
  141. extended density 8" drives.  QE and QED fix this.  Moreover, I have added a 
  142. directory masking option that permits the use of normal CP/M ambiguous file 
  143. characters (*,?) to list a subset fo a directory.  In addition, 'e' did not 
  144. print a complete directory if longer than one screenful.   I have modified 
  145. the listing to pause after each page of files.
  146.      2.   JUMP:  Use of "-Jn" on the command line where n is an integer 
  147. causes the initial program load to jump to line number n, or the bottom of 
  148. the file if n is greater than the number of lines in the file.  This is 
  149. similar to 'e' ver 4.8. I have further modified the jump command to permit 
  150. relative (+/-) jumps of any length (unlike page up or down; alas, not as 
  151. useful as I had hoped).  Moreover, use of "^J,<CR>" or "^J,ESC" sets the 
  152. "jumpto" variable to the current line.  Use of ^KJ repeats the last jump.  
  153. Thus, a very simple "jump marker" is implemented as the following example 
  154. illustrates:
  155.  
  156.                ^J,<CR> (mark this line),
  157.                ...some editing...,
  158.                ^U (top of file),
  159.                ... more editing,
  160.                ^KJ (back to line number marked earlier).
  161.  
  162. I find this feature very useful.  If editing following jump line marking 
  163. adds or deletes lines, then ^KJ will not return to the identical text 
  164. orginally marked (since that text now has a different line number).  This 
  165. could be fixed in later versions.  More than one "jump marker" would be 
  166. desirable.
  167.      3.   REPEAT PAGING: In repeated use of page up or page down, 'e' ver 
  168. 4.6 causes all pages to be completely rewritten.  To speed up movement 
  169. through a file, I allow the rewriting of a page to be interrupted if the 
  170. next comand in the buffer is either "pageup" or "pagedown".  On the files 
  171. QE2A and QE3A for terminals such as ADDS Viewpoint that do not have line 
  172. insert functions, scrolling down (^W) requires re-writing the entire page, 
  173. this is also enhanced by looking at the type-ahead buffer to interupt page 
  174. re-writing if the next character is also for "scroll down".
  175.      4.   CONTROL CHARACTERS:  Use of the sequence "ESC,char" to embed control 
  176. characters into the text did not work properly on my 'e' ver. 4.6.  This has 
  177. been fixed.
  178.      5.   PRINTING CONTROL CHARACTERS:  'e' transmits only a few (none?) 
  179. control characters to the printer.  QE and QED send most control characters 
  180. so that dot matrix printers can be manipulated within the editor (e.g. set 
  181. margins, condensed print, etc).
  182.      6.   FAST DISPLAY 1:   QE and QED use the very nice algorithm in 'e' ver. 
  183. 4.8 to speed up console display using terminal cursor movement.
  184.      7.   FAST DISPLAY 2:  I allow characters to be inserted into the type-
  185. ahead buffer only after a line has been written except when inserting text.  
  186. 'e'  ver 4.6 checks for more input to buffer after every character is 
  187. written.  This slows down the display.  Checking at the end of each line 
  188. seems to cause no problems.  Moreover, 'e' ver 4.6 does not check for type-
  189. ahead buffer overflow; this is a problem on fast terminals with repeat keys. 
  190. Text insertion is checked after each character inserted so that fast typists 
  191. do not lose characters.
  192.      8.   HIGH-LIGHT CURRENT LINE:  The use of all text displayed in normal 
  193. attributes or dimmed with current line normal as in verson 4.6 is controlled 
  194. by a conditional compile statement.  'e' ver 4.8 uses an internal global 
  195. variable permitting switching within sessions.  Since I never want that 
  196. feature and since the fewer "if-checks" the better, I opted for the re-
  197. compilation solution.
  198.      9.   FIND/ALTER STRINGS:  'e' ver 4.6 allowed most control characters 
  199. to be embedded in the string to find or alter, but escape (0x1b) was used to 
  200. terminate the string and thus could not be searched for.  I implemented a 
  201. kludge to work around this.  ^] is translated to 0x1b and embedded in the 
  202. string.  A reminder of this is presented when the find/alter function is 
  203. selected.  Also several other control characters can now be embedded that 
  204. could not have been in 'e'.  Other changes to this function allow the 
  205. "retrieve" function to replay the last previous string to find and alter
  206. from the current positon of the cursor in the string to the end.  Thus, if 
  207. the previous search string is non-empty, then the retrieve function prints 
  208. the previous string from the current position to the end.  If the previous 
  209. search string is empty or the cursor is at the end of the non-empty previous 
  210. search string, then use of the retrieve function will embed the key code for 
  211. the retrieve function into the search string.  For the file of terminal 
  212. characteristics currently used, this is ^L, which is also form feed.  The 
  213. current implementation allows primitive editing of the search string without 
  214. re-typing the entire line.  Assume the previous search string is non-empty; 
  215. the retrieve function (^L) will display to end; backspace and replace 
  216. character to be edited; ^L will re-display the remainder of the string.  To 
  217. re-initialize a search string to be empty, simply backspace to the 
  218. beginnning and hit ESC or <cr>.
  219.  
  220.      C.   Miscellaneous
  221.      1.   Files named QEAxx are altered QExx files that have special 
  222. routines to speed up an ADDS Viewpoint 3A+ on a slow (4MHz) computer.  Mr. 
  223. Gilbert warns in the original documentation that terminals without hardwired 
  224. "deleteline" functions are not worth installing on 'e'.  He is just about 
  225. right, these files help a bit.  
  226.      2.   HINTS TO FUTURE MODIFICATIONS:  For others that wish to modify 
  227. the program for their own purposes, I have these observations.  (1)  The 
  228. files "QEFUNCS.DOC" and "QEDFUNCS.DOC" with this submission lists the 
  229. functions in each file used in QE and QED respectively.  QEFUNCS.DOC is 
  230. relevant to 'e' ver 4.6 also.  (2)  Debugging messages can be  displayed 
  231. within the editor by using the statements:
  232.  
  233.                gotoxy(55,0);       /* go to the right end of the status line*/
  234.                puts(yourmsg);      /* yourmsg is a char pointer */
  235.  
  236. Messages written in this location will not usually be overwritten
  237. immediately.  If numeric output is required, the function "uspr" in QE7 can
  238. be used.
  239.  
  240.  
  241. II.  QED SPECIFIC MODIFICATIONS
  242.  
  243.      QE has been tranlated to DeSmet-C under MSDOS 2.x  and called QED.  
  244. Because of difference in the compiler and the operating system, several 
  245. additional changes have been made.
  246.  
  247.      1.   MSDOS Ver 2.0:   QED requires generic MSDOS version 2.0 or higher 
  248. and checks with a BDOS call that the system uses this version.  No IBM-PC etc 
  249. specific BIOS calls are used.  I.e. no software interrupts below 20 hex are 
  250. used, nor are any port or memory specific references made.
  251.      2.   DIRECTORY:     A paging, maskable MSDOS directory can be listed, 
  252. as in QE.  Path names and sub-directories are supported.
  253.      3.   NO BDOS ERROR RECOVERY:  I don't know how to trap BDOS errors in 
  254. MSDOS, therefore Mr. Gilbert's elegant CP/M BDOS traps have been eliminated.  
  255. I would, of course, be interested in knowing how to do this.
  256.      4.   PATHS:    Specification of paths is supported for files.  A 
  257. function to display and alter the path is implemented (via the file context 
  258. function:  ^QKF).  Since full path names can be almost arbitrarily long, the 
  259. status line displays only the file name.
  260.      5.   MODIFICATION CHECK: If the user attempts to discard a modified 
  261. file without saving it, a query is presented to ensure this was intentional.
  262.      6.   DEFAULT EXTENSION:  The extension of the file called on the 
  263. command line is saved in a default file extension string.  Future file 
  264. requests (performed within a given QED session) do not require a file 
  265. extension to be given.  If no extension is given, the directory is first 
  266. searched for a file as typed.  If this fails, the default extension is 
  267. appended to the input file name and the search repeated.  The default 
  268. extension is overridden by using an explicit extension.  The desirable 
  269. modification of not having to give the file extenson on the command line is 
  270. not necessary in MSDOS by using batch files to invoke QED.  For example, if 
  271. a series of editing sessions is to be undertaken using assembly language 
  272. programming, then the following .BAT file is useful:
  273.  
  274.                QED %1.ASM -T8 -J%2
  275.  
  276. If this batch file is called, say, "e" then the command line "e myprog 150" 
  277. will invoke QED to load MYPROG.ASM, set the tabs to 8 spaces, and jump to 
  278. line 150.  This could also be done with CP/M, but SUBMIT is slower than 
  279. typing in the entire command line.
  280.      7.   DeSmet SPECIFIC MODIFICATONS:  The DeSmet compiler is adequate and 
  281. a good buy.  Several changes were made from QE (using BDS-C) to accomodate 
  282. the different compiler and operating system.  (a)  The function "uspr" was 
  283. altered to take 2 arguments to print either a short or long integer.  Long 
  284. integers are necessary to display disk space on my 8" disks.  (b) The 
  285. following functions were renamed to avoid collision with functions loaded by 
  286. the DeSmet BINDer: "putc" to "eputc", "getc" to "egetc", "puts" to "eputs".  
  287. This renaming might not be necessary, but the manual suggests it is.  (c) 
  288. the use of "sint" to "char" macro in 'e' was changed to "sint" is "int".  
  289. Several variables and intermediate values went negative under MSDOS, causing 
  290. problems.  So at the expense of data storage, I implemented the easiest 
  291. solution I knew.
  292.  
  293. IV.  MAP OF KEYBOARD ASSIGNMENTS
  294.  
  295.   generic                            IBM-PC
  296.  
  297.      ^A        WORD LEFT                    ^left-arrow
  298.      ^B        BOTTOM OF FILE                    end
  299.      ^C        DOWN PAGE                    pg-down
  300.      ^D        CHARACTER RIGHT                    right-arrow
  301.      ^E        UP 1 LINE                    up-arrow
  302.      ^F        WORD RIGHT                    ^right-arrow
  303.      ^G        DELETE CHARACTER UNDER CURSOR            del
  304.      ^H        NON-DESTRUCTIVE BACKSPACE            backspace
  305.      ^I        TAB RIGHT                    tab
  306.      ^J        JUMP TO LINE n or increment of +/- n
  307.      ^K        BLOCK MANIPULATIONS
  308.                B   BLOCK MOVES (AS IN 'e')
  309.                Q   QUIT
  310.                      W=WRITE FILE
  311.                      A=ABANDON EDITED FILE
  312.                X   WRITE FILE AND EXIT TO SYSTEM
  313.                J   REPEAT JUMP TO LAST MARKED LINE NUMBER
  314.                R   READ FILE
  315.      ^L        REPEAT LAST FIND/ALTER
  316.      ^M        CARRIAGE RETURN                    enter
  317.      ^N        NEW LINE
  318.      ^O        MOVE TO LEFTMOST CHARACTER ON LINE        ^home
  319.      ^P        MOVE TO RIGHTMOST CHARACTER ON LINE        ^end
  320.      ^Q        'QUICK' OPTIONS
  321.                A    FIND AND REPLACE
  322.                F    FIND
  323.                K    EDITING CONTEXT (TABS, FILES, ETC.)
  324.                Y    DELETE TO END OF LINE
  325.      ^R        UP 1 SCREEN                    pg-up
  326.      ^S        CHARACTER LEFT                    left-arrow
  327.      ^T        DELETE WORD TO THE RIGHT
  328.      ^U        MOVE TO TOP OF FILE                home
  329.      ^V        MOVE TO BOTTOM OF SCREEN
  330.      ^W        SCROLL UP THROUGH TEXT   (CURSOR CONSTANT)
  331.      ^X        LINE DOWN                    down-arrow
  332.      ^Y        MOVE TO TOP OF SCREEN
  333.      ^Z        SCROLL DOWN THROUGH TEXT (CURSOR CONSTANT)
  334.      ^[        ESCAPE                        esc
  335.      ^\        DELETE LINE
  336.      ^]        NO FUNCTION
  337.      ^^        HELP
  338.      ^_        RESTORE EDITED/DELETED LINE
  339.      DEL       DELETE CHARACTER TO LEFT OF CURSOR        ^backspace
  340. 
  341. V.  FUTURE MODIFICATIONS
  342.  
  343.      My future projects with QED are the following.  In further violation 
  344. of Nigel Gilbert's philosopy, I will create another editor based on QED that 
  345. has wordwrap, variable right margins and simple reformatting capabilites so 
  346. that QED plus a runoff program (NRO, ROFF, etc) will look more like a word 
  347. processor.  Second, I would like to add to this latter editor outline 
  348. processing capabilities along the lines of "Thinktank".  Third, I want to
  349. add regular expression capabilities to the find/alter function of QED so as 
  350. to implement a better version of the UNIX editor "vi."  This should not 
  351. be terribly difficult with the appropriate subroutines used from a public 
  352. domain "grep" or from the vanNuys Toolkit (e.g. "sub").  Finally, (and 
  353. actually more immediately) I am porting QED to the VAX 780.  It will be 
  354. disappointing at 1200 baud, but better than the line editor currently 
  355. available.
  356.